﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditApply.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Weixin.EditApply"  ValidateRequest="False" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>
<%@ Register src="~/SystemManage/Control/JFileControl.ascx" tagname="JFileControl" tagprefix="jfc" %>

<form id="pageForm" method="post" runat="Server" class="pageForm required-validate"
    onsubmit="return validateCallback(this, navTabAjaxDone);" action="/SystemManage/Weixin/DataApply/EditApply.aspx">
    
<div class="pageContent">
    <div class="pageFormContent" layoutH="56">
        <dl class="nowrap">
            <dt>活动标题：</dt>
            <dd><asp:TextBox ID="tb_name" Width="200px" runat="server"></asp:TextBox>（建议10个汉字以内）</dd>
        </dl>
        <dl class="nowrap">
            <dt>活动简介：</dt>
            <dd><asp:TextBox ID="tb_desc" Width="300px" runat="server"></asp:TextBox>（建议13个汉字以内）</dd>
        </dl>
        <dl class="nowrap">
            <dt>详细内容：</dt>
            <dd>
                <textarea class="editor" name="txtContent" rows="7" cols="75" style="width: 100%" id="txtContent" runat="Server"
                    uplinkurl="/SystemManage/Common/ContentUpload.aspx?dir=doc&ext=zip,rar,txt" uplinkext="zip,rar,txt"
                    upimgurl="/SystemManage/Common/ContentUpload.aspx?dir=doc&ext=jpg,jpeg,gif,png" upimgext="jpg,jpeg,gif,png"
                    upflashurl="/SystemManage/Common/ContentUpload.aspx?dir=doc&ext=swf" upflashext="swf"
                    upmediaurl="/SystemManage/Common/ContentUpload.aspx?dir=doc&ext=avi" upmediaext="avi">
                </textarea>
            </dd>
        </dl>
        <dl>
            <dt>开始时间：</dt>
            <dd>
                <asp:TextBox ID="tb_sdate" runat="server" class="date" format="yyyy-MM-dd" ></asp:TextBox><a class="inputDateButton" href="javascript:;">选择</a>
            </dd>
        </dl>
        <dl>
            <dt>结束时间：</dt>
            <dd>
                <asp:TextBox ID="tb_edate" runat="server" class="date" format="yyyy-MM-dd" ></asp:TextBox><a class="inputDateButton" href="javascript:;">选择</a>
            </dd>
        </dl>
        
        <dl class="nowrap">
            <dt>活动状态：</dt>
            <dd style="color: #FF0000;">
               <%= ParamKit.GetValue("WxGamesStatus", _applyDb == null ? "SETTING" : _applyDb.Status, "&nbsp;")%>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt>预约项目设置：</dt>
            <dd>【可选值】请使用半角逗号（,）分隔</dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目一：</dt>
            <dd>
        <input id="ipc_i1" type="checkbox" class="checkctl" runat="server" data-rel="1"/><span>是否启用</span>
        <fieldset style="display: none;" id="field1">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_1" Width="150px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_1" Width="100px" runat="server" class="checktype" data-rel="1">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_1" type="checkbox" runat="server"/>
            </p>
            <p id="pfield1">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_1" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目二：</dt>
            <dd>
        <input id="ipc_i2" type="checkbox" class="checkctl" runat="server" data-rel="2"/><span>是否启用</span>
        <fieldset style="display: none;" id="field2">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_2" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_2" Width="100px" runat="server" class="checktype" data-rel="2">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_2" type="checkbox" runat="server"/>
            </p>
            <p id="pfield2">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_2" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目三：</dt>
            <dd>
        <input id="ipc_i3" type="checkbox" class="checkctl" runat="server" data-rel="3"/><span>是否启用</span>
        <fieldset style="display: none;" id="field3">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_3" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_3" Width="100px" runat="server" class="checktype" data-rel="3">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_3" type="checkbox" runat="server"/>
            </p>
            <p id="pfield3">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_3" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目四：</dt>
            <dd>
        <input id="ipc_i4" type="checkbox" class="checkctl" runat="server" data-rel="4"/><span>是否启用</span>
        <fieldset style="display: none;" id="field4">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_4" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_4" Width="100px" runat="server" class="checktype" data-rel="4">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_4" type="checkbox" runat="server"/>
            </p>
            <p id="pfield4">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_4" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目五：</dt>
            <dd>
        <input id="ipc_i5" type="checkbox" class="checkctl" runat="server" data-rel="5"/><span>是否启用</span>
        <fieldset style="display: none;" id="field5">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_5" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_5" Width="100px" runat="server" class="checktype" data-rel="5">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_5" type="checkbox" runat="server"/>
            </p>
            <p id="pfield5">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_5" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目六：</dt>
            <dd>
        <input id="ipc_i6" type="checkbox" class="checkctl" runat="server" data-rel="6"/><span>是否启用</span>
        <fieldset style="display: none;" id="field6">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_6" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_6" Width="100px" runat="server" class="checktype" data-rel="6">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_6" type="checkbox" runat="server"/>
            </p>
            <p id="pfield6">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_6" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目七：</dt>
            <dd>
        <input id="ipc_i7" type="checkbox" class="checkctl" runat="server" data-rel="7"/><span>是否启用</span>
        <fieldset style="display: none;" id="field7">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_7" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_7" Width="100px" runat="server" class="checktype" data-rel="7">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_7" type="checkbox" runat="server"/>
            </p>
            <p id="pfield7">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_7" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目八：</dt>
            <dd>
        <input id="ipc_i8" type="checkbox" class="checkctl" runat="server" data-rel="8"/><span>是否启用</span>
        <fieldset style="display: none;" id="field8">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_8" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_8" Width="100px" runat="server" class="checktype" data-rel="8">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_8" type="checkbox" runat="server"/>
            </p>
            <p id="pfield8">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_8" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目九：</dt>
            <dd>
        <input id="ipc_i9" type="checkbox" class="checkctl" runat="server" data-rel="9"/><span>是否启用</span>
        <fieldset style="display: none;" id="field9">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_9" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_9" Width="100px" runat="server" class="checktype" data-rel="9">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_9" type="checkbox" runat="server"/>
            </p>
            <p id="pfield9">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_9" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>项目十：</dt>
            <dd>
        <input id="ipc_i10" type="checkbox" class="checkctl" runat="server" data-rel="10"/><span>是否启用</span>
        <fieldset style="display: none;" id="field10">
            <p>
                <label>标题：</label>
                <asp:TextBox ID="tb_item_10" Width="200px" runat="server"></asp:TextBox>
            </p>
            <p>
                <label>类型：</label>
                <asp:dropdownlist ID="ddl_item_10" Width="100px" runat="server" class="checktype" data-rel="10">
                </asp:dropdownlist>
            </p>
            <p>
                <label>是否必填：</label>
                <input id="cb_m_10" type="checkbox" runat="server"/>
            </p>
            <p id="pfield10">
                <label>可选值：</label>
                <asp:TextBox ID="tb_val_10" Width="230px" runat="server" ></asp:TextBox>
            </p>
        </fieldset>
            </dd>   
        </dl>
        <dl class="nowrap">
            <dt>预约成功提示：</dt>
            <dd><asp:TextBox ID="tb_success" Width="400px" runat="server"></asp:TextBox></dd>
        </dl>
        <dl class="nowrap">
            <dt>预约结束提示：</dt>
            <dd><asp:TextBox ID="tb_end" Width="400px" runat="server"></asp:TextBox></dd>
        </dl>        
        <dl class="nowrap">
            <dt>预约封面图片：</dt>
            <dd>（支持JPG、PNG格式，较好的效果为640*320）</dd>
        </dl>
        <dl class="nowrap">
            <dt>&nbsp;</dt>
            <dd><jfc:JFileControl ID="fc_open" runat="server" FileCountLimit="1" FileFilters="*.jpg;*.jpeg;*.bmp;*.png;*.gif" FileDesc="图片"/></dd>
        </dl>
        <dl class="nowrap">
            <dt>是否发送邮箱：</dt>
            <dd>
                <fieldset >
                    <p>
                    <input id="cb_mail" type="checkbox" runat="server"/><span>是否启用</span>
                    </p>
                    <p>
                    <label>邮箱地址：</label>
                    <asp:TextBox ID="tb_mail" Width="230px" runat="server" ></asp:TextBox>
                    </p>
                </fieldset>
            </dd>
        </dl>
	</div>
	
    <div class="formBar">
		<ul>
            <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
			<li>
				<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
			</li>
		</ul>
	</div>
</div>
<script type="text/javascript">

    $(".checkctl").bind('click', function () {
        $this = $(this);
        $field = $("#field" + $this.attr("data-rel"));
        if ($this.attr("checked") == true) {
            $field.slideDown();
        }
        else {
            $field.slideUp();
        }
    });
    $(".checktype").bind('change', function () {
        $this = $(this);
        $field = $("#pfield" + $this.attr("data-rel"));
        sel = $this.val();

        if (sel == "cbox" || sel == "ddlist" || sel == "rbox") {
            $field.slideDown();
        }
        else {
            $field.slideUp();
        }
    });
    $(document).ready(function () {
        $(".checkctl").each(function () {
            $this = $(this);
            $field = $("#field" + $this.attr("data-rel"));
            if ($this.attr("checked") == true) {
                $field.show();
            }
            else {
                $field.hide();
            }
        });
        $(".checktype").each(function () {
            $this = $(this);
            $field = $("#pfield" + $this.attr("data-rel"));
            sel = $this.val();

            if (sel == "cbox" || sel == "ddlist" || sel == "rbox") {
                $field.show();
            }
            else {
                $field.hide();
            }
        });
    });
</script>
</form>

